// pages/login/login.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    userName:'',
    password:''
  },
  onReady: function(){
    wx.hideLoading()
  },
  // 页面方法
  userNameInput: function(e){
    this.setData({
      userName: e.detail.value
    })
  },
  passwordInput: function(e){
    this.setData({
      password: e.detail.value
    })
  },
  gopage: function () {
    // let successTo = function(){
    //   // console.log(getApp().globalData)     
    //   wx.redirectTo({
    //     url: '/pages/nav/nav',
    //   })
    // }
    // shitang1 aaaa1111
    wx.setStorageSync('username', this.data.userName)
    wx.setStorageSync('password', this.data.password)
    getApp().getToken(this.data.userName, this.data.password)
  }
})